<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<c:if test="${not empty lstFlightUpdates}">
<table style="COLOR: #004040; FONT-WEIGHT: bold; FONT-SIZE: x-small; FONT-FAMILY: 'Verdana'; vertical-align: top; 
border-bottom-style:solid; ; border-bottom-color: gray; border-right-style:solid; ; border-right-color: gray; border-left-style:solid; ;
 border-left-color: gray; border-top-style:solid; ; border-top-color: gray" >
 <thead style="BACKGROUND-COLOR: #fbfe70;">
			
			<tr>
				
				<td>Flight Number</td>
				<td>Airline</td>
				<td>Source</td>
				<td >Intermediate</td>
				<td >Destination</td>
				<td >Flight Time</td>
				<td >IAT</td>
				<td >IDT</td>
				<td>Journey Date</td>
				<td>Message</td>
			</tr>
		</thead>
		
		
		
			<c:set var="i" value="1"/>
			<c:forEach items="${lstFlightUpdates}" var="item">
			<c:if test="${i % 2 == 0}">
				<c:set value="BACKGROUND-COLOR: #d6d6d6;" var="style"></c:set>
			</c:if>
			<tr style="${style}">
				<c:set value="" var="style"></c:set>
				
				<td><c:out value="${item.flight.flightNumber}" /></td>
				<td><c:out value="${item.flight.airlineName}" /></td>
				<td><c:out value="${item.flight.source}"></c:out></td>
				<td><c:out value="${item.flight.intermediate}" /></td>
				<td><c:out value="${item.flight.destination}" /></td>
				<td><c:out value="${item.flight.timeOfFlight}" /></td>
				<td><c:out value="${item.flight.intermediateArrivalTime}" /></td>
				<td><c:out value="${item.flight.intermediateDepartureTime}" /></td>
				<td><c:out value="${item.journey.dateOfJourney}"></c:out></td>
				<td><c:out value="${item.message}" /></td>
								
				<c:set var="i" value="${i+1}"/>
			</tr>
			</c:forEach>
	
		
 
</table>
</c:if>
</body>
</html>